package messages;

import static org.junit.Assert.*;

import org.junit.Test;

public class DeregistrationTest {
    
	@Test
    public void testDataConstructor()
    {
        byte[] data = new byte[] {MessageType.DeregistrationMessage.getIdentifier()};
        new DeregistrationMessage(data);
    }
    
	@Test
    public void testToArray()
    {
        DeregistrationMessage mess = new DeregistrationMessage();
        byte[] result = mess.toByteArray();
        assertEquals(1, result.length);
        assertEquals(MessageType.DeregistrationMessage.getIdentifier(), result[0]);
    }
    
	@Test
    public void testGetSize()
    {
        DeregistrationMessage mess = new DeregistrationMessage();
        assertEquals(1, mess.getMessageSize());
    }
    
	@Test
    public void testGetMessageType()
    {
        DeregistrationMessage mess = new DeregistrationMessage();
        assertEquals(MessageType.DeregistrationMessage, mess.getMessageType());
    }

}
